<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p ="http://primefaces.org/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <title>Países</title>
        <ui:include src="/WEB-INF/partials/layout/admin/includes.xhtml"/>
    </h:head>
    <h:body>

        <ui:include src="/WEB-INF/partials/layout/admin/menu.xhtml"/>

        <h:form style="left: 50%">
            <p:growl autoUpdate="true"/>
            <h1><h:outputText value="Criar/Editar"/></h1>
            <h:inputHidden id="id" value="#{PaisCrudMB.entity.id}"/>
            <div align="center">
                <p:panelGrid columns="2" style="left: 50%">
                    <h:outputLabel value="Pais:" for="nome" />
                    <p:inputText id="nome" value="#{PaisCrudMB.entity.nome}" title="Nome" required="true" requiredMessage="Por favor Preencha o Pais"/>
                    <h:outputLabel value="Sigla:" for="sigla" />
                    <h:inputText id="sigla" value="#{PaisCrudMB.entity.sigla}" title="Sigla" />

                    <f:facet name="footer"> 
                        <p:commandButton value="Voltar" onclick="window.location='./index.xhtml'"/>
                        <p:commandButton value="Salvar" action="#{PaisCrudMB.save()}"/>
                    </f:facet>
                </p:panelGrid>
            </div>
        </h:form>
    </h:body>
</html>